# -*- coding: utf-8 -*-

from odoo import models, fields, api
from odoo.exceptions import UserError


class BaseApproveFlow(models.Model):
    _description = u'审核流'
    _name = 'base.approve.flow'
    department_id=fields.Many2one('hr.department',string='部门')
    res_model=fields.Selection([
        ('hr.expense.sheet','报销单'),
        ('expense.advance.payment', '借款'),
        ('hr.payment.request', '付款单')
    ],string=u'单据')
    name=fields.Char()
    line_ids=fields.One2many('base.approve.flow.line','flow_id')

class BaseApproveFlowLine(models.Model):
    _name = 'base.approve.flow.line'
    flow_id=fields.Many2one('base.approve.flow')
    user_id=fields.Many2one('res.users')
    sequence=fields.Integer(default=10)
    amount=fields.Float(string=u'额度')





